<!DOCTYPE html>
<!-- saved from url=(0052)http://getbootstrap.com/docs/4.0/examples/dashboard/ -->
<html lang="en" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
    <meta content="" name="description">
    <meta content="" name="author">

    <title>用户新增</title>
    <link th:href="@{/asserts/css/bootstrap.min.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/font-awesome.min.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/plugins/footable/footable.core.css}" rel="stylesheet">
    <link href="asserts/css/bootstrap-select.min.css" rel="stylesheet"
          th:href="@{/asserts/css/bootstrap-select.min.css}">
    <link th:href="@{/asserts/css/animate.min.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/style.min.css}" rel="stylesheet">
    <link th:href="@{/asserts/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet">
    <link th:href="@{/asserts/js/layer/laydate/skins/default/laydate.css}" rel="stylesheet">
    <link th:href="@{/asserts/js/layer/laydate/need/laydate.css}" rel="stylesheet">

</head>

<body class="gray-bg">
<div class="wrapper wrapper-content  animated fadeInRight">
    <div class="row">
        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5 class="col-sm-10 padding-top-10">修改密码</h5>
                    <div class="col-sm-2 text-right"><a href="javascript:history.back(-1)">返回</a></div>
                </div>

                <div class="ibox-content">
                    <span th:if="${error}" style="color:red">[[#{message.password.error}]]</span>
                    <form id="form1" th:action="@{/sysuser/updatepwd}" method="post">
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label my-font-bold"
                                   for="oldPassword">[[#{message.password.old}]]<span
                                    style="color:red;">*</span></label>
                            <div class="col-sm-6">
                                <input class="form-control" id="oldPassword" name="oldPassword" placeholder="oldPassword"
                                       th:placeholder="#{message.password.old}"
                                       type="password" required>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label my-font-bold"
                                   for="newPassword">[[#{message.password.new}]]<span
                                    style="color:red;">*</span></label>
                            <div class="col-sm-6">
                                <input class="form-control" id="newPassword" name="newPassword" placeholder="newPassword"
                                       th:placeholder="#{message.password.new}"
                                       type="password" required>
                            </div>
                        </div>
                        <div class="form-group row">
                            <label class="col-sm-2 col-form-label my-font-bold"
                                   for="confirmPassword">[[#{message.password.confirm}]]<span
                                    style="color:red;">*</span></label>
                            <div class="col-sm-6">
                                <input class="form-control" id="confirmPassword" name="confirmPassword"
                                       placeholder="confirmPassword"
                                       th:placeholder="#{message.password.confirm}"
                                       type="password" required>
                            </div>
                        </div>

                        <div class="row">
                            <div class="col  col-sm-8">
                                <div class="col-sm-4 col-sm-offset-2">
                                    <button class="btn btn-primary btn-sm badge-pill fa fa-save" type="submit"
                                            id="submitBtn">
                                        修改密码
                                    </button>
                                    <a class="btn btn-white btn-sm fa" href="javascript:history.back(-1)">[[#{message.cancel}]]</a>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>

            </div>
        </div>
    </div>
</div>
<!--必须在bootstrap前引用-->
<script src="asserts/js/jquery.min.js" th:src="@{/asserts/js/jquery.min.js}" type="text/javascript"></script>
<script src="asserts/js/bootstrap.min.js" th:src="@{/asserts/js/bootstrap.min.js}" type="text/javascript"></script>
<!-- Graphs -->
<script th:replace="common/myJs::myCommonJs"></script>
<script th:src="@{/asserts/js/layer/laydate/laydate.js}" type="text/javascript"></script>
<script src="asserts/js/layer/layer.min.js" th:src="@{/asserts/js/layer/layer.min.js}" type="text/javascript"></script>
<script src="asserts/js/bootstrap-table/bootstrap-table.min.js"
        th:src="@{/asserts/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script src="asserts/js/bootstrap-table/locale/bootstrap-table-zh-CN.js" th:if="${session.lang=='zh_CN'}"
        th:src="@{/asserts/js/bootstrap-table/locale/bootstrap-table-zh-CN.js}" type="text/javascript"></script>
<script src="asserts/js/tree-view/js/bootstrap-treeview.js" th:src="@{/asserts/js/tree-view/js/bootstrap-treeview.js}"
        type="text/javascript"></script>
<script src="asserts/js/jquery-file-upload.js" th:src="@{/asserts/js/jquery-file-upload.js}"
        type="text/javascript"></script>
<script src="asserts/js/bootstrap-select.min.js" th:src="@{/asserts/js/bootstrap-select.min.js}"
        type="text/javascript"></script>

<script th:inline="javascript">
    $(function () {
        let sysUserRoles = [[${sysUserSelected} ? ${sysUserSelected.sysUserRoles}]];
        if (sysUserRoles) {
            let arr = [];
            for (var a = 0, length = sysUserRoles.length; a < length; a++) {
                arr.push(sysUserRoles[a].roleId)
            }
            $('.roleSelectpicker').selectpicker('val', arr);
        }
        let sysUserAuditRoles = [[${sysUserSelected} ? ${sysUserSelected.sysUserAuditRoles}]];
        let arr2 = [];
        if (sysUserAuditRoles) {
            for (let a = 0, length = sysUserAuditRoles.length; a < length; a++) {
                arr2.push(sysUserAuditRoles[a].auditRoleId)
            }
            $('.auditRoleSelectpicker').selectpicker('val', arr2);
        }
        let sysUserDataRoles = [[${sysUserSelected} ? ${sysUserSelected.sysUserDataRoles}]];
        let arr3 = [];
        if (sysUserDataRoles) {
            for (let a = 0, length = sysUserDataRoles.length; a < length; a++) {
                arr3.push(sysUserDataRoles[a].roleId)
            }
            $('.dataRoleSelectpicker').selectpicker('val', arr3);
        }
    })
</script>

</body>
</html>
